Skip to content

Conversation

@williambrady
Copy link
Owner

Add new ContainerScanner that uses Trivy to scan Docker images for CVEs:

  • Detects Dockerfiles in repositories
  • Builds images from Dockerfiles
  • Runs trivy image to scan for package vulnerabilities
  • Reports findings in normalized format with remediation guidance
  • Configurable via config.yaml (severities, timeouts, cleanup)

Updated components:

  • repo_detector.py: Added Dockerfile detection
  • main.py: Integrated ContainerScanner into scan pipeline
  • config_loader.py: Added container scanning defaults
  • config.yaml: Added container scanning configuration section

Add new ContainerScanner that uses Trivy to scan Docker images for CVEs:
- Detects Dockerfiles in repositories
- Builds images from Dockerfiles
- Runs trivy image to scan for package vulnerabilities
- Reports findings in normalized format with remediation guidance
- Configurable via config.yaml (severities, timeouts, cleanup)

Updated components:
- repo_detector.py: Added Dockerfile detection
- main.py: Integrated ContainerScanner into scan pipeline
- config_loader.py: Added container scanning defaults
- config.yaml: Added container scanning configuration section
@augmentcode
Copy link

augmentcode bot commented Jan 28, 2026

🤖 Augment PR Summary

Summary: Adds Docker container image vulnerability scanning to the SDLC Code Scanner using Trivy.

Changes:

  • Introduced ContainerScanner to build images from detected Dockerfiles and run trivy image to collect CVE data
  • Extended repository detection to recognize Dockerfiles/Containerfiles and enable container scanning automatically
  • Integrated container scanning into the local scan pipeline and documented it in the list-tools output
  • Added container-scanning defaults and config options (severities, timeouts, image cleanup, rule exclusions)

Technical Notes: Trivy JSON output is parsed into the existing normalized Finding format, including package/version details, CVSS metadata, and fix-version-based remediation guidance.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 2 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

william brady added 2 commits January 28, 2026 00:18
- Check for Docker availability before attempting to build images
- Sanitize image names: lowercase, alphanumeric and hyphens only
Copy link
Collaborator

@ghaworkflow ghaworkflow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Content looks correct.

@williambrady williambrady merged commit 7abe74c into main Jan 28, 2026
5 checks passed
@williambrady williambrady deleted the feature/container-image-scanning branch January 28, 2026 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants